<?php

namespace app\api\validate;

use think\Validate;
use app\common\Error;

class Record extends Validate
{
    protected $rule = [
        'video_detail_id'  => 'require',
        'video_id' => 'require',
        'sort' => 'require',
    ];

    protected $message  =   [
        'video_detail_id.require'   => Error::VIDEO_DETAIL_ID_NOT_EXIXTS,
        'video_id.require' => Error::VIDEO_ID_NOT_EXIXTS,
        'sort.require' => Error::SORT_NOT_EXIXTS,
    ];

    protected $scene = [
        'add' => ['video_detail_id'],
        'add_play' => ['video_detail_id', 'video_id', 'sort'],
        'cancel_play' => ['video_id'],
    ];
}